package com.sky.loveshop.service;

import com.github.pagehelper.PageInfo;
import com.sky.loveshop.entity.User;
import com.sky.loveshop.entity.UserShopRelation;
import com.sky.loveshop.entity.exception.BizException;
import com.sky.loveshop.entity.qo.UserQO;
import com.sky.loveshop.entity.qo.UserRequest;
import com.sky.loveshop.entity.vo.UserVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author xcy
 * @version V1.0
 * @description
 * @date 2024/8/18 0:05
 */
public interface UserService {

    List<UserVO> listUser(UserQO qo);

    PageInfo<UserVO> listUserPages(UserQO qo);

    UserVO getUserById(Integer id);

    List<UserShopRelation> getShopsByUserId(Integer id);

    List<UserVO> getUserListByIds(List<Integer> ids);

    Integer addUser(User user);

    Integer delUserById(Integer id);

    Integer updateUserById(User user);

    UserVO login(UserQO user) throws BizException;

    Integer userBindShopUpdate(UserRequest.BindParam req);

    Integer deducePoints(Integer userId, BigDecimal totalAmount);
}
